package panel;
import java.awt.GridLayout;

import javax.swing.JLabel;
import javax.swing.JPanel;

import a.jframe.ActionListenerPanel;

import checkbox.JCheckBoxPanel;


public class CommandPanel extends JPanel {

	private static final long serialVersionUID = -6076916471870235225L;
	private String labconnection;
	public CommandPanel(String labname)
	{
		labconnection=labname;
		setLayout(new GridLayout(1,0));
		add(panelinside());
		add(generatedcommand());
	}
	public CommandPanel()
	{
		setLayout(new GridLayout(1,0));
		add(panelinside());
		add(generatedcommand());
	}
	
	JPanel panelinside(){
		JPanel panel=new JPanel();
		panel.setLayout(new GridLayout(1,0));
		panel.add(new JLabel("Select :"));
		JCheckBoxPanel jcheckbox =new JCheckBoxPanel(true,"description");
		jcheckbox.addActionListener(new ActionListenerPanel(labconnection));
		panel.add(new JLabel("description"));
		panel.add(jcheckbox);
		return panel;
	}
	static JLabel command;
	public static void setcommand(String a)
	{
		command.setText(a);
	}
	JPanel generatedcommand()
	{
		command=new JLabel("sssssssssssssss");
		JPanel panel=new JPanel();
		panel.setLayout(new GridLayout(1,0));
		panel.add(command);
		return panel;
	}
}
